package com.lagou.rpc.provider.config;

import com.lagou.rpc.provider.zookeeperRegister.ZookeeperRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class Reg implements ApplicationRunner {

    @Autowired
    ZookeeperRegister regster;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("通过实现ApplicationRunner接口，在spring boot项目启动后打印参数");
        regster.register("127.0.0.1","127.0.0.1","8901");
    }

}
